define(["Zepto", 
        "underscore", 
        "Backbone", 
        "Handlebars",  
        "text!templates/hall/halllistitem.html" 
], function($, _, Backbone, Handlebars, template) {
	
   
var HallListItemView = Backbone.View.extend({

        template: Handlebars.compile(template),

        initialize: function() {
            this.model.bind("change", this.render, this);
            this.model.bind("destroy", this.close, this);
        },

        render: function(eventName) {
        	  // $('form').remove();
        	  // $('header').empty();
        	  // $('header').html('Lista Aule libere');
        	//alert('model ' + this.model.get('nome'));
            $(this.el).html(this.template(this.model.toJSON()));
            
            
           
            return this;
        }
    });


    return HallListItemView;

});

